﻿#ifndef SOFTWAREREGISTERDIALOG_H
#define SOFTWAREREGISTERDIALOG_H

#include <QDialog>

#include "ui_SoftwareRegisterDialog.h"

#include "RegistrationAlgorithm.h"

namespace Core {

	class SoftwareRegisterDialog : public QDialog
	{
		Q_OBJECT

	public:
		explicit SoftwareRegisterDialog(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
		~SoftwareRegisterDialog();

	private Q_SLOTS:
		/**
		 * @brief	slotGetMachineCodeBtnClicked 获取设备的机器码 
		 * @return 
		 */
		void slotGetMachineCodeBtnClicked();

		/**
		 * @brief	slotWriteRegistrationCodeBtnClicked 写入软件注册码
		 * @return 
		 */
		void slotWriteRegistrationCodeBtnClicked();

		/**
		 * @brief	slotTestRegistrationBtnClicked 测试是否注册
		 * @return 
		 */
		void slotTestRegistrationBtnClicked();

	private:
		/**
		 * @brief  initUI 初始化窗口  
		 * @return 
		 */
		void initUI();

	private:
		Ui::SoftwareRegisterDialog ui;
		RegistrationAlgorithm * m_pRegistrationAlgorithm;			// 注册算法
	};

}//namespace Core

#endif // SOFTWAREREGISTERDIALOG_H